package sctu.edu.java.year2016.team07.nieying.practice.Review;

/**
 * Created by Administrator on 2016/6/16 0016.
 */
public class Trace {
    public static void main(String[] args){
        int arr[][]={{1,2,2},{8,5,0},{8,6,3}};
        int tr=0;
        System.out.println("输出数组：");
        for(int i=0;i<arr.length;i++){
            for(int j=0;j<arr.length;j++){
                System.out.println(arr[i][j]);
            }
        }
        for(int i=0;i<arr.length;i++){
            tr=tr+arr[i][i];
        }
        System.out.println("输出迹："+tr);
    }
}
